# -*- coding:utf-8 -*-
class Solution:
    def jumpFloor(self, number):
        
        ## 递归时间太长
        #if number == 1:
        #    return 1
        
        #if number == 2:
        #    return 2
        
        #return self.jumpFloor(number-1) + self.jumpFloor(number-2)
        
        ## 动态规格，又是一个斐波那契数列
        if number == 1:
            return 1
        
        if number == 2:
            return 2
        
        num_1 = 1
        num_2 = 2
        if number > 2:
            for i in range(number-2):
                temp = num_2
                num_2 = num_2 + num_1
                num_1 = temp
        return num_2